import librpg
from librpg.config import game_config, graphics_config, menu_config
from librpg.context import get_context_stack
from librpg.collection.theme import ClassicMenuTheme

from clubs import CLUB_NAMES
from clubmenu import TeamMenu
from domain.simulation import Simulation

from random import choice


def main():
    librpg.init()
    graphics_config.config(scale=1,
                           screen_height=768,
                           screen_width=1024)
    menu_config.config(theme=ClassicMenuTheme(),
                       font_size=14)

    my_team = choice(CLUB_NAMES)
    print 'My team is %s' % my_team
    simulation = Simulation(my_team)
    teammenu = TeamMenu(simulation)
    
    get_context_stack().stack_model(teammenu)
    get_context_stack().gameloop()

if __name__ == '__main__':
    main()
